package com.canaan.business.mapper.inOutStock;

import com.canaan.business.domain.inOutStock.StockOccupyDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库存占用明细Mapper接口
 *
 * @author ruoyi
 * @date 2023-02-11
 */
public interface StockOccupyDetailMapper {
    /**
     * 查询库存占用明细
     *
     * @param id 库存占用明细主键
     * @return 库存占用明细
     */
    public StockOccupyDetail selectStockOccupyDetailById(Long id);

    /**
     * 查询库存占用明细列表
     *
     * @param stockOccupyDetail 库存占用明细
     * @return 库存占用明细集合
     */
    public List<StockOccupyDetail> selectStockOccupyDetailList(StockOccupyDetail stockOccupyDetail);

    /**
     * 新增库存占用明细
     *
     * @param stockOccupyDetail 库存占用明细
     * @return 结果
     */
    public int insertStockOccupyDetail(StockOccupyDetail stockOccupyDetail);

    /**
     * 批量新增库存占用明细
     *
     * @param stockOccupyDetailList 库存占用明细列表
     * @return 结果
     */
    public int batchInsertStockOccupyDetail(List<StockOccupyDetail> stockOccupyDetailList);

    /**
     * 修改库存占用明细
     *
     * @param stockOccupyDetail 库存占用明细
     * @return 结果
     */
    public int updateStockOccupyDetail(StockOccupyDetail stockOccupyDetail);

    /**
     * 批量修改库存占用明细
     *
     * @param stockOccupyDetailList 库存占用明细列表
     * @return 结果
     */
    public int batchUpdateStockOccupyDetail(List<StockOccupyDetail> stockOccupyDetailList);

    /**
     * 删除库存占用明细
     *
     * @param id 库存占用明细主键
     * @return 结果
     */
    public int deleteStockOccupyDetailById(Long id);

    /**
     * 批量删除库存占用明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStockOccupyDetailByIds(Long[] ids);

    /**
     * 查询库存占用明细
     *
     * @param no 编号
     * @return 库存占用明细
     */
    public StockOccupyDetail selectStockOccupyDetailByNo(String no);

    /**
     * 批量删除库存占用明细
     *
     * @param nos 需要删除的编号集合
     * @return 结果
     */
    public int deleteStockOccupyDetailByNos(String[] nos);

    /**
     * 删除库存占用明细信息
     *
     * @param no 编号
     * @return 结果
     */
    public int deleteStockOccupyDetailByNo(String no);

    /**
     * 获取占用数据
     */
    public List<StockOccupyDetail> getStockOccupyDetailByStorehouseNoProductNo(@Param("storehouseNo") String storehouseNo, @Param("productNo")String productNo, @Param("occupyType")String occupyType);

}
